﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true"
    CodeBehind="Bind.aspx.cs" Inherits="Cn.Cellula.Website.Admin.Product.Group.Bind"
    Title="产品分组绑定" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CPH_PageTitle" runat="server">
    产品分组绑定
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="CPH_MainBody" runat="server">
    <fieldset>
        <legend>查询</legend>
        <table border="0" cellpadding="0" cellspacing="0" class="query_table">
            <tr>
                <td class="query_title">
                    <span class="required">产品分组：</span>
                </td>
                <td class="query_content">
                    <asp:DropDownList runat="server" ID="ddl_Group">
                    </asp:DropDownList>
                </td>
                <td class="query_title">
                    产品分类：
                </td>
                <td class="query_content">
                    <asp:DropDownList runat="server" ID="ddl_Category">
                    </asp:DropDownList>
                </td>
                <td class="query_title">
                    产品名称：
                </td>
                <td class="query_content">
                    <asp:TextBox runat="server" ID="txt_Name"></asp:TextBox>
                </td>
                <td class="query_title">
                    规格：
                </td>
                <td class="query_content">
                    <asp:TextBox runat="server" ID="txt_Model" Width="60px" MaxLength="20"></asp:TextBox>
                </td>
                <td class="query_title">
                    编号：
                </td>
                <td class="query_content">
                    <asp:TextBox runat="server" ID="txt_ProductNo" Width="60px" MaxLength="20"></asp:TextBox>
                </td>
            </tr>
        </table>
    </fieldset>
    <table cellpadding="0" cellspacing="0">
        <tr>
            <td valign="top">
                <div class="action_bar">
                    <asp:Button runat="server" ID="btn_QueryGrouped" Text="查询" 
                        onclick="btn_QueryGrouped_Click" />
                    <asp:Button runat="server" ID="btn_Remove" Text="移除到右列表" 
                        OnClientClick="return acu.gv.checkMultiSelect(fixId('gvList'));" 
                        onclick="btn_Remove_Click" />
                </div>
                <fieldset class="fieldset_2">
                    <legend>已选择的产品</legend>
                    <asp:GridView ID="gvList" runat="server" AutoGenerateColumns="false" CssClass="GridView"
                        DataKeyNames="ProductId" AllowPaging="True" PageSize="20" PagerSettings-Mode="Numeric"
                        OnPageIndexChanging="gvList_PageIndexChanging">
                        <Columns>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <input id="CheckAll" onclick="return acu.gv.selectAll(this,event);" tabindex="0"
                                        type="checkbox" title="点击全选或反全选当前页所有信息" />
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="cbxRow" runat="server" CausesValidation="False"></asp:CheckBox>
                                </ItemTemplate>
                                <ItemStyle Width="10px" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="名称">
                                <ItemTemplate>
                                    <a href='Biz/Product/Details.aspx?id=<%# DataBinder.Eval(Container, "DataItem.ProductId")%>' target="_blank">
                                        <%# DataBinder.Eval(Container, "DataItem.ProductName")%></a>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField HeaderText="分类" DataField="CategoryName" />
                            <asp:BoundField HeaderText="编号" DataField="ProductNo" />
                            <asp:BoundField HeaderText="规格" DataField="ProductModel" />
                        </Columns>
                        <PagerTemplate>
                            <asp:LinkButton ID="lbnFirst" runat="Server" Text="首页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>'
                                CommandName="Page" CommandArgument="First"></asp:LinkButton>
                            <asp:LinkButton ID="lbnPrev" runat="server" Text="上一页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>'
                                CommandName="Page" CommandArgument="Prev"></asp:LinkButton>
                            <asp:Label ID="lblPage" runat="server" Text='<%# "第" + (((GridView)Container.NamingContainer).PageIndex + 1)  + "页/共" + (((GridView)Container.NamingContainer).PageCount) + "页" %> '></asp:Label>
                            <asp:LinkButton ID="lbnNext" runat="Server" Text="下一页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != (((GridView)Container.NamingContainer).PageCount - 1) %>'
                                CommandName="Page" CommandArgument="Next"></asp:LinkButton>
                            <asp:LinkButton ID="lbnLast" runat="Server" Text="尾页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != (((GridView)Container.NamingContainer).PageCount - 1) %>'
                                CommandName="Page" CommandArgument="Last"></asp:LinkButton>
                        </PagerTemplate>
                        <HeaderStyle CssClass="GridViewHeader" />
                        <RowStyle CssClass="GridViewRow" />
                        <FooterStyle CssClass="GirdViewFooter" />
                        <AlternatingRowStyle CssClass="GirdViewAlternatingRow" />
                        <PagerStyle CssClass="GridViewPager" />
                        <EmptyDataRowStyle CssClass="GridViewEmptyDataRow" />
                        <EmptyDataTemplate>
                            没有相关的数据</EmptyDataTemplate>
                    </asp:GridView>
                </fieldset>
            </td>
            <td valign="middle">
                <div style="width:20px">&nbsp;</div>
            </td>
            <td valign="top">
                <div class="action_bar">
                    <asp:Button runat="server" ID="btn_Add" Text="添加到左列表" 
                        OnClientClick="return acu.gv.checkMultiSelect(fixId('gvProduct'));" 
                        onclick="btn_Add_Click" />
                </div>
                <fieldset class="fieldset_2">
                    <legend>未选择的产品</legend>
                    <asp:GridView ID="gvProduct" runat="server" AutoGenerateColumns="false" CssClass="GridView"
                        DataKeyNames="ProductId" AllowPaging="True" PageSize="20" PagerSettings-Mode="Numeric"
                        OnPageIndexChanging="gvProduct_PageIndexChanging">
                        <Columns>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <input id="CheckAll" onclick="return acu.gv.selectAll(this,event);" tabindex="0"
                                        type="checkbox" title="点击全选或反全选当前页所有信息" />
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="cbxRow" runat="server" CausesValidation="False"></asp:CheckBox>
                                </ItemTemplate>
                                <ItemStyle Width="10px" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="名称">
                                <ItemTemplate>
                                    <a href='Biz/Product/Details.aspx?id=<%# DataBinder.Eval(Container, "DataItem.ProductId")%>' target="_blank">
                                        <%# DataBinder.Eval(Container, "DataItem.ProductName")%></a>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField HeaderText="分类" DataField="CategoryName" />
                            <asp:BoundField HeaderText="编号" DataField="ProductNo" />
                            <asp:BoundField HeaderText="规格" DataField="ProductModel" />
                        </Columns>
                        <PagerTemplate>
                            <asp:LinkButton ID="lbnFirst" runat="Server" Text="首页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>'
                                CommandName="Page" CommandArgument="First"></asp:LinkButton>
                            <asp:LinkButton ID="lbnPrev" runat="server" Text="上一页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>'
                                CommandName="Page" CommandArgument="Prev"></asp:LinkButton>
                            <asp:Label ID="lblPage" runat="server" Text='<%# "第" + (((GridView)Container.NamingContainer).PageIndex + 1)  + "页/共" + (((GridView)Container.NamingContainer).PageCount) + "页" %> '></asp:Label>
                            <asp:LinkButton ID="lbnNext" runat="Server" Text="下一页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != (((GridView)Container.NamingContainer).PageCount - 1) %>'
                                CommandName="Page" CommandArgument="Next"></asp:LinkButton>
                            <asp:LinkButton ID="lbnLast" runat="Server" Text="尾页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != (((GridView)Container.NamingContainer).PageCount - 1) %>'
                                CommandName="Page" CommandArgument="Last"></asp:LinkButton>
                        </PagerTemplate>
                        <HeaderStyle CssClass="GridViewHeader" />
                        <RowStyle CssClass="GridViewRow" />
                        <FooterStyle CssClass="GirdViewFooter" />
                        <AlternatingRowStyle CssClass="GirdViewAlternatingRow" />
                        <PagerStyle CssClass="GridViewPager" />
                        <EmptyDataRowStyle CssClass="GridViewEmptyDataRow" />
                        <EmptyDataTemplate>
                            没有相关的数据</EmptyDataTemplate>
                    </asp:GridView>
                </fieldset>
            </td>
        </tr>
    </table>
</asp:Content>
